package a.j;

import javax.swing.*;
import java.awt.*;
import java.awt.geom.Point2D;

public class bg
  extends gf
{
  private int m;
  private int G;
  private double H;
  private double I;
  private Timer J;
  private ie K;
  private dg L;
  private int M;
  private int N;
  private Cursor O;
  private Cursor P;
  private Cursor Q;
  private boolean R = true;
  public static boolean S;
  
  public bg(df paramdf)
  {
    super(paramdf);
    w();
  }
  
  public bg()
  {
    w();
  }
  
  private void w()
  {
    a("NAVIGATION_MODE");
    a(Cursor.getPredefinedCursor(0));
    b(Cursor.getPredefinedCursor(13));
    this.K = new ie(null, 0.0D, 0.0D);
  }
  
  public void b(boolean paramBoolean)
  {
    boolean bool = ld.E;
    super.b(paramBoolean);
    if (!bool) {
      if (paramBoolean)
      {
        this.M = this.i.o();
        this.N = this.i.n();
        this.O = this.i.O();
        if (!bool)
        {
          if (this.R) {
            this.i.a(21, 31);
          }
          this.i.a(this.P);
          this.i.b();
          if (bool) {}
        }
        else if (!ld.D)
        {
          return;
        }
      }
      else
      {
        this.i.a(this.M, this.N);
        this.i.a(this.O);
      }
    }
    this.i.b();
  }
  
  public boolean x()
  {
    return this.R;
  }
  
  public void g(boolean paramBoolean)
  {
    this.R = paramBoolean;
  }
  
  public dg y()
  {
    return this.L;
  }
  
  public void a(dg paramdg)
  {
    n.a(this, "setting the popup");
    this.L = paramdg;
  }
  
  public void mousePressedLeft(double paramDouble1, double paramDouble2)
  {
    this.m = this.j;
    this.G = this.k;
    Point2D localPoint2D = this.i.J();
    this.H = localPoint2D.getX();
    this.I = localPoint2D.getY();
    this.i.a(this.Q);
  }
  
  public void mousePressedRight(double paramDouble1, double paramDouble2)
  {
    boolean bool = ld.E;
    if (!bool) {
      if (y() == null)
      {
        this.m = this.j;
        this.G = this.k;
        this.K.a(this.i, paramDouble1, paramDouble2);
        this.J = new Timer(20, this.K);
        this.J.setCoalesce(true);
        this.J.setDelay(20);
        this.J.setInitialDelay(20);
        this.J.setRepeats(true);
        this.K.c();
        if (bool) {
          break label123;
        }
        this.J.start();
        if (!ld.D) {
          return;
        }
      }
    }
    label123:
    a(y(), this.s, null, null);
  }
  
  public void mouseReleasedRight(double paramDouble1, double paramDouble2)
  {
    boolean bool = ld.E;
    if (((bool) || (y() == null)) && ((bool) || (this.J != null)))
    {
      this.J.stop();
      this.K.d();
      this.J = null;
    }
  }
  
  public void mouseReleasedLeft(double paramDouble1, double paramDouble2)
  {
    this.i.a(this.P);
  }
  
  public void mouseDraggedLeft(double paramDouble1, double paramDouble2)
  {
    double d1 = this.j - this.m;
    double d2 = this.k - this.G;
    this.i.a(this.H - d1 / this.i.M(), this.I - d2 / this.i.M());
    this.i.b();
  }
  
  public void mouseDraggedRight(double paramDouble1, double paramDouble2)
  {
    if (!ld.E)
    {
      if (this.K != null)
      {
        this.K.a(this.i, this.i.f(this.m), this.i.g(this.G));
        this.K.c();
      }
    }
    else {
      this.K.a((this.j - this.m) / this.i.M(), (this.k - this.G) / this.i.M());
    }
  }
  
  public Cursor z()
  {
    return this.P;
  }
  
  public void a(Cursor paramCursor)
  {
    this.P = paramCursor;
  }
  
  public Cursor A()
  {
    return this.Q;
  }
  
  public void b(Cursor paramCursor)
  {
    this.Q = paramCursor;
  }
  
  public ie B()
  {
    return this.K;
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.bg

 * JD-Core Version:    0.7.0.1

 */